﻿using System;

namespace Netbits.Common.Extensions
{
	/// <summary>
	/// Represents environment extensions
	/// </summary>
	public static class EnvironmentExtensions
	{
		#region Private Static Variables

		private static bool? _IsMonoRuntime;

		#endregion

		#region Public Static Functions

		/// <summary>
		/// Get if this instance runs under mono-runtime
		/// </summary>
		public static bool IsMonoRuntime
		{
			get
			{
				if( _IsMonoRuntime == null )
					_IsMonoRuntime = Type.GetType( "Mono.Runtime" ) != null;
				return (bool)_IsMonoRuntime;
			}
		}

		#endregion
	}
}
